home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1995 March / PC Plus Super CD (Issue 101) (March 1995).iso / sharewar / vbaddon / vbfiles / fezprint.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-09-14  |  21.1 KB  |  649 lines

  1. VERSION 2.00
  2. Begin Form fEZPrint 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Replacement for the Printer Object"
  6.    ClientHeight    =   6525
  7.    ClientLeft      =   675
  8.    ClientTop       =   390
  9.    ClientWidth     =   7515
  10.    Height          =   6990
  11.    Left            =   585
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   6525
  16.    ScaleWidth      =   7515
  17.    Top             =   15
  18.    Width           =   7695
  19.    Begin vsViewPort vsViewPort2 
  20.       BackColor       =   &H00808080&
  21.       Height          =   3795
  22.       Left            =   420
  23.       Top             =   1260
  24.       VirtualHeight   =   7410
  25.       VirtualWidth    =   0
  26.       Width           =   1905
  27.       Begin CommandButton Command1 
  28.          BackColor       =   &H00808080&
  29.          Caption         =   "Line by Line"
  30.          Height          =   645
  31.          Index           =   0
  32.          Left            =   105
  33.          TabIndex        =   16
  34.          Top             =   105
  35.          Width           =   1380
  36.       End
  37.       Begin CommandButton Command1 
  38.          BackColor       =   &H00808080&
  39.          Caption         =   "Paragraph"
  40.          Height          =   645
  41.          Index           =   1
  42.          Left            =   105
  43.          TabIndex        =   15
  44.          Top             =   840
  45.          Width           =   1380
  46.       End
  47.       Begin CommandButton Command1 
  48.          BackColor       =   &H00808080&
  49.          Caption         =   "Tables"
  50.          Height          =   645
  51.          Index           =   2
  52.          Left            =   105
  53.          TabIndex        =   14
  54.          Top             =   1575
  55.          Width           =   1380
  56.       End
  57.       Begin CommandButton Command1 
  58.          BackColor       =   &H00808080&
  59.          Caption         =   "Multi-Columns"
  60.          Height          =   645
  61.          Index           =   3
  62.          Left            =   105
  63.          TabIndex        =   13
  64.          Top             =   2310
  65.          Width           =   1380
  66.       End
  67.       Begin CommandButton Command1 
  68.          BackColor       =   &H00808080&
  69.          Caption         =   "Draw"
  70.          Height          =   645
  71.          Index           =   4
  72.          Left            =   105
  73.          TabIndex        =   12
  74.          Top             =   5250
  75.          Width           =   1380
  76.       End
  77.       Begin CommandButton Command1 
  78.          BackColor       =   &H00808080&
  79.          Caption         =   "&AlignText"
  80.          Height          =   645
  81.          Index           =   5
  82.          Left            =   105
  83.          TabIndex        =   11
  84.          Top             =   3045
  85.          Width           =   1380
  86.       End
  87.       Begin CommandButton Command1 
  88.          BackColor       =   &H00808080&
  89.          Caption         =   "&Indent"
  90.          Height          =   645
  91.          Index           =   6
  92.          Left            =   105
  93.          TabIndex        =   10
  94.          Top             =   3780
  95.          Width           =   1380
  96.       End
  97.       Begin CommandButton Command1 
  98.          BackColor       =   &H00808080&
  99.          Caption         =   "&Mail Merge"
  100.          Height          =   645
  101.          Index           =   7
  102.          Left            =   105
  103.          TabIndex        =   9
  104.          Top             =   4515
  105.          Width           =   1380
  106.       End
  107.       Begin CommandButton Command1 
  108.          BackColor       =   &H00808080&
  109.          Caption         =   "&Graphics"
  110.          Height          =   645
  111.          Index           =   8
  112.          Left            =   105
  113.          TabIndex        =   8
  114.          Top             =   5985
  115.          Width           =   1380
  116.       End
  117.       Begin CommandButton Command1 
  118.          BackColor       =   &H00808080&
  119.          Caption         =   "Angle"
  120.          Height          =   645
  121.          Index           =   10
  122.          Left            =   105
  123.          TabIndex        =   7
  124.          Top             =   6720
  125.          Width           =   1380
  126.       End
  127.    End
  128.    Begin CommandButton Command1 
  129.       BackColor       =   &H00C0C0C0&
  130.       Caption         =   "&Order Form"
  131.       Height          =   540
  132.       Index           =   9
  133.       Left            =   420
  134.       TabIndex        =   0
  135.       Top             =   5250
  136.       Width           =   1905
  137.    End
  138.    Begin ComboBox cmbOrientation 
  139.       Enabled         =   0   'False
  140.       Height          =   300
  141.       Left            =   3360
  142.       Style           =   2  'Dropdown List
  143.       TabIndex        =   1
  144.       Top             =   105
  145.       Width           =   1065
  146.    End
  147.    Begin CommandButton cmdPrint 
  148.       BackColor       =   &H00C0C0C0&
  149.       Caption         =   "&Print"
  150.       Enabled         =   0   'False
  151.       Height          =   330
  152.       Left            =   6195
  153.       TabIndex        =   3
  154.       Top             =   105
  155.       Width           =   1065
  156.    End
  157.    Begin vsViewPort vsViewPort1 
  158.       BackColor       =   &H00808080&
  159.       Height          =   5895
  160.       Left            =   2625
  161.       Top             =   525
  162.       VirtualHeight   =   0
  163.       VirtualWidth    =   0
  164.       Width           =   4635
  165.       Begin vsPrinter VSPrinter1 
  166.          AbortCaption    =   ""
  167.          BackColor       =   &H00FFFFFF&
  168.          BrushColor      =   &H0080FFFF&
  169.          FontBold        =   0   'False
  170.          FontItalic      =   0   'False
  171.          FontName        =   "Arial"
  172.          FontSize        =   39.75
  173.          FontUnderline   =   0   'False
  174.          Footer          =   "||Page %d"
  175.          HdrColor        =   &H00800000&
  176.          HdrFontBold     =   -1  'True
  177.          HdrFontItalic   =   -1  'True
  178.          HdrFontName     =   "Arial"
  179.          HdrFontSize     =   24
  180.          Header          =   "|VideoSoft VSView"
  181.          Height          =   4005
  182.          Left            =   255
  183.          PenWidth        =   20
  184.          TableSep        =   "|;"
  185.          Top             =   210
  186.          Width           =   2850
  187.       End
  188.    End
  189.    Begin ComboBox cmbZoom 
  190.       Enabled         =   0   'False
  191.       Height          =   300
  192.       Left            =   5040
  193.       Style           =   2  'Dropdown List
  194.       TabIndex        =   2
  195.       Top             =   105
  196.       Width           =   960
  197.    End
  198.    Begin Image Image2 
  199.       Height          =   330
  200.       Left            =   525
  201.       Picture         =   FEZPRINT.FRX:0000
  202.       Stretch         =   -1  'True
  203.       Top             =   5880
  204.       Visible         =   0   'False
  205.       Width           =   540
  206.    End
  207.    Begin Label Label1 
  208.       Alignment       =   2  'Center
  209.       AutoSize        =   -1  'True
  210.       BackStyle       =   0  'Transparent
  211.       Caption         =   "Orient."
  212.       ForeColor       =   &H00000000&
  213.       Height          =   195
  214.       Index           =   2
  215.       Left            =   2730
  216.       TabIndex        =   6
  217.       Top             =   105
  218.       Width           =   615
  219.    End
  220.    Begin Label Label1 
  221.       Alignment       =   2  'Center
  222.       AutoSize        =   -1  'True
  223.       BackStyle       =   0  'Transparent
  224.       Caption         =   "Zoom"
  225.       ForeColor       =   &H00000000&
  226.       Height          =   195
  227.       Index           =   1
  228.       Left            =   4515
  229.       TabIndex        =   5
  230.       Top             =   105
  231.       Width           =   495
  232.    End
  233.    Begin Image Image1 
  234.       Height          =   375
  235.       Left            =   105
  236.       Picture         =   FEZPRINT.FRX:0BA2
  237.       Top             =   105
  238.       Width           =   345
  239.    End
  240.    Begin Label Label1 
  241.       Alignment       =   2  'Center
  242.       BackStyle       =   0  'Transparent
  243.       Caption         =   "VSPrinter: The Visual Printer"
  244.       FontBold        =   -1  'True
  245.       FontItalic      =   0   'False
  246.       FontName        =   "MS Sans Serif"
  247.       FontSize        =   13.5
  248.       FontStrikethru  =   0   'False
  249.       FontUnderline   =   0   'False
  250.       ForeColor       =   &H00800000&
  251.       Height          =   1275
  252.       Index           =   0
  253.       Left            =   630
  254.       TabIndex        =   4
  255.       Top             =   105
  256.       Width           =   1800
  257.    End
  258. Option Explicit
  259. Dim MyPage%         'Keep the output view to be printed
  260. Dim OldOrientation  'Don't mess with my printer settings
  261. Sub cmbOrientation_Click ()
  262.   mousepointer = 11
  263.   vsPrinter1.Orientation = cmbOrientation.ListIndex
  264.   cmbZoom_click
  265.   If MyPage >= 0 Then command1_click MyPage
  266.   mousepointer = 0
  267. End Sub
  268. Sub cmbZoom_click ()
  269.   vsPrinter1.Visible = False
  270.   mousepointer = 11
  271.   'Change the screen size to zoom value
  272.   vsPrinter1.Width = vsPrinter1.PageWidth * Val(cmbZoom) / 100
  273.   vsPrinter1.Height = vsPrinter1.PageHeight * Val(cmbZoom) / 100
  274.   'Make scrollable ViewPort
  275.   vsViewPort1.VirtualWidth = vsPrinter1.Width + 400
  276.   vsViewPort1.VirtualHeight = vsPrinter1.Height + 400
  277.   ' center printer if it fit on the screen
  278.   If vsPrinter1.Width < vsViewPort1.Width Then vsPrinter1.Left = (vsViewPort1.Width - vsPrinter1.Width) / 2
  279.   If vsPrinter1.Height < vsViewPort1.Height Then vsPrinter1.Top = (vsViewPort1.Height - vsPrinter1.Height) / 2
  280.   mousepointer = 0
  281.   vsPrinter1.Visible = True
  282. End Sub
  283. Sub cmdPrint_Click ()
  284.   mousepointer = 11
  285.   ' Cancel Preview mode and print
  286.   vsPrinter1.Preview = False
  287.   command1_click MyPage
  288.   vsPrinter1.Preview = True
  289.   mousepointer = 0
  290. End Sub
  291. Sub command1_click (Index%)
  292.       
  293.   cmbZoom.Enabled = True
  294.   cmdPrint.Enabled = True
  295.   cmbOrientation.Enabled = True
  296.   MyPage = Index%
  297.   vsPrinter1.Action = 3 'Start Document
  298.   mousepointer = 11
  299.   Select Case Index
  300.     Case 0
  301.       DoLine
  302.     Case 1
  303.       DoParagraph
  304.     Case 2
  305.       DoTable
  306.     Case 3
  307.       DoColumns
  308.     Case 4
  309.       DoDrawing
  310.     Case 5
  311.       DoAlign
  312.     Case 6
  313.       DoIndent
  314.     Case 7
  315.       DoMailMerge "Joe Smith", "Chief Financial Officer"
  316.       DoMailMerge "Mary Kerney", "President"
  317.     Case 8
  318.       DoGraphics
  319.     Case 9
  320.       DoOrder
  321.     Case 10
  322.       DoAngle
  323.   End Select
  324.   vsPrinter1.Action = 6 'End Document
  325.   mousepointer = 0
  326. End Sub
  327. Sub DoAlign ()
  328.       
  329.       vsPrinter1.SpaceAfter = 500
  330.       vsPrinter1.TextColor = QBColor(1)
  331.       vsPrinter1.TextAlign = 1  'Center
  332.       vsPrinter1.FontUnderline = True
  333.       vsPrinter1.Paragraph = ""
  334.       vsPrinter1.Paragraph = "VSPrinter automatically aligns proportional fonts"
  335.       vsPrinter1.FontUnderline = False
  336.       
  337.       vsPrinter1.TextColor = QBColor(0)
  338.       vsPrinter1.CurrentY = vsPrinter1.PageHeight / 2
  339.       vsPrinter1.TextAlign = 2  'Rigth
  340.       vsPrinter1.Paragraph = "Text is right aligned"
  341.       vsPrinter1.TextAlign = 1  'Center
  342.       vsPrinter1.Paragraph = "Text is centered"
  343.       vsPrinter1.TextAlign = 0  'Left
  344.       vsPrinter1.Paragraph = "Text is left aligned"
  345.       vsPrinter1.SpaceAfter = 0
  346. End Sub
  347. Sub DoAngle ()
  348.   Dim i%, j%
  349.       vsPrinter1.TextAngle = 450
  350.       vsPrinter1 = ""
  351.       vsPrinter1 = ""
  352.       vsPrinter1 = ""
  353.       vsPrinter1 = ""
  354.       vsPrinter1 = "Rotate text"
  355.       vsPrinter1 = "to any angle"
  356.       
  357.       'Rotate Text
  358.       j = 1
  359.       For i = 450 To 3600 Step 900
  360.         vsPrinter1.TextColor = QBColor(j)
  361.         vsPrinter1.CurrentX = vsPrinter1.PageWidth * .5
  362.         vsPrinter1.CurrentY = vsPrinter1.PageHeight * .5
  363.         vsPrinter1.TextAngle = i
  364.         vsPrinter1.Text = "VSView"
  365.         j = j + 1
  366.       Next
  367.       vsPrinter1.TextAngle = 0
  368.       vsPrinter1.TextColor = 0
  369. End Sub
  370. Sub DoColumns ()
  371.       Dim s$, i%
  372.       s = "VSPrinter can also print in multiple columns. "
  373.       s = s + "You have control over column breaks, and you can save "
  374.       s = s + "a whole lot of paper by using multiple columns."
  375.       
  376.       
  377.       vsPrinter1.Columns = 2
  378.       vsPrinter1.PageBorder = 5
  379.       
  380.       
  381.       vsPrinter1.TextColor = QBColor(1)
  382.       vsPrinter1 = s
  383.       vsPrinter1 = ""
  384.       vsPrinter1.TextColor = QBColor(0)
  385.       vsPrinter1 = s
  386.       'Restore settings
  387.       vsPrinter1.Columns = 1
  388.       vsPrinter1.PageBorder = 3
  389. End Sub
  390. Sub DoDrawing ()
  391.       Dim s$, x%, y%
  392.       vsPrinter1.CurrentX = vsPrinter1.PageWidth / 2
  393.       vsPrinter1.CurrentY = vsPrinter1.PageHeight / 2
  394.       vsPrinter1.TextAlign = 1              ' Center
  395.       vsPrinter1.TextColor = &H800000       'Blue
  396.       vsPrinter1 = "Add graphics to your reports!"
  397.       vsPrinter1.TextColor = &H0&           'Black
  398.       vsPrinter1 = "With VSPrinter, it's easy!"
  399.       vsPrinter1.TextAlign = 0              ' Left
  400.       vsPrinter1.X1 = vsPrinter1.PageWidth / 4 * .25
  401.       vsPrinter1.Y1 = vsPrinter1.PageHeight / 4 * .25
  402.       vsPrinter1.X2 = vsPrinter1.PageWidth / 4 * 1.25
  403.       vsPrinter1.Y2 = vsPrinter1.PageHeight / 4 * 1.25
  404.       vsPrinter1.BrushColor = &HFF&         'Red
  405.       vsPrinter1.BrushStyle = 6             'Cross
  406.       vsPrinter1.Draw = 3                   'Circle
  407.       vsPrinter1.X1 = vsPrinter1.PageWidth * .7
  408.       vsPrinter1.Y1 = vsPrinter1.PageHeight * .7
  409.       vsPrinter1.X2 = vsPrinter1.PageWidth * .9
  410.       vsPrinter1.Y2 = vsPrinter1.PageHeight * .9
  411.       vsPrinter1.BrushColor = &H800080      'Purple
  412.       vsPrinter1.BrushStyle = 7             'Cross Diagonal
  413.       vsPrinter1.Draw = 2                   'Rect.
  414.       ' complex graphics
  415.       s = ""
  416.       For x = vsPrinter1.MarginLeft To vsPrinter1.PageWidth - vsPrinter1.MarginRight Step 20
  417.         y = 6000 + Cos(x * 3.1416 / 180) * (x - vsPrinter1.PageWidth / 2) / 10
  418.         s = s + Str(x) + Str(y)
  419.       Next
  420.       vsPrinter1.PenWidth = 10
  421.       vsPrinter1.PolyLine = s
  422.       vsPrinter1.PenWidth = 0
  423. End Sub
  424. Sub DoGraphics ()
  425.   Dim s$, fmt$
  426.   ' Print Title
  427.   vsPrinter1 = ""
  428.   vsPrinter1.CurrentX = 2500
  429.   vsPrinter1.TextColor = QBColor(1)
  430.   vsPrinter1 = "Metafiles and Bitmaps"
  431.   vsPrinter1.TextColor = QBColor(0)
  432.   vsPrinter1.FontSize = 28
  433.   vsPrinter1 = ""
  434.   vsPrinter1 = "You can now print and preview reports that includes bitmaps and metafiles.  With VSView, who needs desktop publishing. <g>"
  435.   vsPrinter1 = ""
  436.   'Place pictures--------------------------
  437.   vsPrinter1.X1 = 1000
  438.   vsPrinter1.Y1 = 1000
  439.   vsPrinter1.X2 = 2400
  440.   vsPrinter1.Y2 = 2400
  441.   vsPrinter1.Picture = ftoolbox!Picture1(1).Picture
  442.       
  443.   vsPrinter1.FontSize = 40
  444. End Sub
  445. Sub DoIndent ()
  446.   vsPrinter1.IndentFirst = 1000
  447.   vsPrinter1 = "You can automatically indent the FIRST LINE of the paragraph."
  448.   vsPrinter1 = ""
  449.   vsPrinter1.IndentFirst = 0
  450.   vsPrinter1.IndentLeft = 1000
  451.   vsPrinter1 = "You can automatically indent from the LEFT margin of the paragraph."
  452.   vsPrinter1 = ""
  453.   vsPrinter1.IndentLeft = 0
  454.   vsPrinter1.IndentRight = 1000
  455.   vsPrinter1 = "You can automatically indent from the RIGHT margin of the paragraph."
  456.   vsPrinter1 = ""
  457.   vsPrinter1.IndentLeft = 1000
  458.   vsPrinter1.IndentFirst = 1500
  459.   vsPrinter1 = "You can even combined all levels of indentation."
  460.   'Restore Values
  461.   vsPrinter1.IndentLeft = 0
  462.   vsPrinter1.IndentFirst = 0
  463.   vsPrinter1.IndentRight = 0
  464. End Sub
  465. Sub DoLine ()
  466.       
  467.       vsPrinter1.TextColor = 0
  468.       vsPrinter1 = ""
  469.       vsPrinter1.Text = "With VSPrinter you can print "
  470.       vsPrinter1.FontBold = True
  471.       vsPrinter1.TextColor = RGB(255, 0, 255)
  472.       vsPrinter1.Text = "Line by Line"
  473.       vsPrinter1.TextColor = 0
  474.       vsPrinter1.FontBold = False
  475.       vsPrinter1.Text = " just like you would in VB."
  476.       vsPrinter1.Text = " Text wraps automatically, so your life becomes easier."
  477. End Sub
  478. Sub DoMailMerge (FullName$, Position$)
  479.   vsPrinter1.FontBold = False
  480.   vsPrinter1.FontSize = 24
  481.   vsPrinter1.TextColor = 0
  482.   vsPrinter1 = Format$(Now, "mmmm d, yyyy")
  483.   vsPrinter1 = ""
  484.   vsPrinter1.Text = "This letter is to inform that "
  485.   vsPrinter1.TextColor = RGB(255, 0, 0)
  486.   vsPrinter1.Text = FullName
  487.   vsPrinter1.TextColor = 0
  488.   vsPrinter1.Text = " has been promoted as "
  489.   vsPrinter1.TextColor = RGB(255, 0, 0)
  490.   vsPrinter1.Text = Position
  491.   vsPrinter1.TextColor = 0
  492.   vsPrinter1.Text = " of this company."
  493.   vsPrinter1 = ""
  494.   vsPrinter1 = ""
  495.   vsPrinter1.FontSize = 40
  496. End Sub
  497. Sub DoOrder ()
  498.   Dim fmt$, s$, INCHES%
  499.   INCHES = 1440
  500.   vsPrinter1.FontSize = 30
  501.   vsPrinter1.FontBold = True
  502.   'Place picture
  503.   vsPrinter1.X1 = vsPrinter1.PageWidth - (2.5 * INCHES)
  504.   vsPrinter1.Y1 = .75 * INCHES
  505.   vsPrinter1.X2 = vsPrinter1.X1 + (2 * INCHES)
  506.   vsPrinter1.Y2 = vsPrinter1.Y1 + (1.25 * INCHES)
  507.   vsPrinter1.Picture = Image2.Picture
  508.   'Title
  509.   vsPrinter1.CurrentY = .75 * INCHES
  510.   vsPrinter1 = "ORDER FORM"
  511.   '---------------------------------------------------------------
  512.   vsPrinter1.PenWidth = 2
  513.   vsPrinter1.FontSize = 10
  514.   vsPrinter1.FontBold = False
  515.   vsPrinter1 = "Please rush my order to the following address:"
  516.   vsPrinter1 = ""
  517.   fmt = "2500|>4500;"
  518.   s = fmt
  519.   s = s + "Name|;"
  520.   s = s + "Company|;"
  521.   s = s + "Address|;"
  522.   s = s + "|;"
  523.   s = s + "|;"
  524.   s = s + "|;"
  525.   s = s + "Phone|;"
  526.   s = s + "Fax|;"
  527.   s = s + "Credit Card #|;"
  528.   s = s + "Expiration Date|;"
  529.   s = s + "Comments|;"
  530.   s = s + "|;"
  531.   s = s + "|;"
  532.   vsPrinter1.TableBorder = 5
  533.   vsPrinter1.Table = s
  534.   vsPrinter1 = ""
  535.   vsPrinter1 = ""
  536.   vsPrinter1 = "Fax your credit card order to 510-547-1084 or mail your check or money order to: VideoSoft, 2625 Alcatraz Avenue, Suite 271, Berkeley, California 94705.  Sorry no CODs."
  537.   vsPrinter1 = ""
  538.   vsPrinter1.TableBorder = 7
  539.   vsPrinter1.TextAlign = 1  'Center
  540.   'Center Titles
  541.   fmt = "^2000|^4000|^2000|^2000;"
  542.   s = fmt
  543.   s = s + "QUANTITY|COPIES OF|PRICE|TOTAL;"
  544.   vsPrinter1.Table = s
  545.   'Print Body 4 Columns
  546.   fmt = "^2000|4000|>2000|>2000;"
  547.   s = fmt
  548.   s = s + "|VideoSoft VSView|$99.00|;"
  549.   s = s + "|VideoSoft VSVBX|$45.00|;"
  550.   s = s + "|VideoSoft CodeBook|$45.00|;"
  551.   vsPrinter1.Table = s
  552.   'Print Body 2 Columns
  553.   fmt = ">8000|>2000;"
  554.   s = fmt
  555.   s = s + "California state residents add 8.5% sales tax|;"
  556.   s = s + "Shipping and Handling Domestic|US$6.00;"
  557.   s = s + "Shipping and Handling International|US$10.00;"
  558.   s = s + "TOTAL|;"
  559.   vsPrinter1.Table = s
  560.   'Restore settings
  561.   vsPrinter1.TextAlign = 0  'Left
  562.   vsPrinter1.TableBorder = 7
  563.   vsPrinter1.FontSize = 40
  564.   vsPrinter1.PenWidth = 20
  565. End Sub
  566. Sub DoParagraph ()
  567.       Dim s$
  568.       s = "You can print whole paragraphs at once! This is very easy. "
  569.       
  570.       vsPrinter1 = s + s
  571.       vsPrinter1 = ""
  572.       vsPrinter1 = "VSPrinter takes care of indentation, wrapping, spacing, etc."
  573. End Sub
  574. Sub DoTable ()
  575.   Dim s$, fmt$
  576.   ' Print Title
  577.   vsPrinter1 = "Print by Table"
  578.   vsPrinter1.FontSize = 18
  579.   vsPrinter1 = ""
  580.   vsPrinter1 = "You can now print reports that includes paragraphs and tables.  With VSView, printing a grid it is very easy."
  581.   vsPrinter1 = ""
  582.   '---------------------------------------------------------------
  583.   'Set sizes and justification
  584.   fmt = "2500|>1600|^1600|>2100|>2200;"                   '^Center > Right
  585.   s = fmt + "Product|Code|Region|Units Sold|Revenue;"     'Set header
  586.   s = s + "Spam in a Can|00012|North|  372|$23,542;"
  587.   s = s + "Flipper Tuna|00231|North|  832|$44,432;"
  588.   s = s + "Jiffy Lubed Butter |00978|North|  452|$53,535"
  589.   vsPrinter1.PenWidth = 8
  590.   vsPrinter1.TextAlign = 1  'Center
  591.   vsPrinter1.FontSize = 18
  592.   vsPrinter1.Table = s
  593.   vsPrinter1 = ""
  594.   vsPrinter1.FontSize = 14
  595.   vsPrinter1.TableBorder = 8
  596.   vsPrinter1.Table = s
  597.   vsPrinter1 = ""
  598.   vsPrinter1.TableBorder = 9
  599.   vsPrinter1.Table = s
  600.   vsPrinter1.TextAlign = 0        'Left
  601.   vsPrinter1 = ""
  602.   vsPrinter1 = "The table's cells could be aligned the way you want to."
  603.   'Restore Values
  604.   vsPrinter1.FontSize = 40
  605. End Sub
  606. Sub DoTitle ()
  607.   vsPrinter1.Action = 3 'Start Document
  608.   vsPrinter1.CurrentX = vsPrinter1.PageWidth / 2
  609.   vsPrinter1.CurrentY = vsPrinter1.PageHeight / 2
  610.   vsPrinter1.TextAlign = 1 'Center
  611.   vsPrinter1.TextColor = QBColor(2)
  612.   vsPrinter1.Paragraph = "VideoSoft VSPrinter"
  613.   vsPrinter1.TextColor = QBColor(0)
  614.   vsPrinter1.Paragraph = ""
  615.   vsPrinter1.Paragraph = "Click on any button"
  616.   vsPrinter1.TextAlign = 0 'Left
  617.   vsPrinter1.Action = 6 'End Document
  618. End Sub
  619. Sub Form_Load ()
  620.   OldOrientation = vsPrinter1.Orientation
  621.   MyPage = -1    'No pages selected
  622.   vsPrinter1.Preview = True
  623.   vsPrinter1.PreviewPage = 1
  624.   cmbZoom.AddItem "35"
  625.   cmbZoom.AddItem "50"
  626.   cmbZoom.AddItem "75"
  627.   cmbZoom.AddItem "100"
  628.   cmbZoom.AddItem "150"
  629.   cmbZoom.AddItem "200"
  630.   cmbZoom.ListIndex = 0
  631.   cmbOrientation.AddItem "Portrait"
  632.   cmbOrientation.AddItem "Landscape"
  633.   cmbOrientation.ListIndex = 0
  634.   MyPage = 0    'Default to first button
  635. End Sub
  636. Sub Form_Unload (Cancel As Integer)
  637.   'Restore priner orientation
  638.   vsPrinter1.Orientation = OldOrientation
  639. End Sub
  640. Sub VSPrinter1_NewTableCell (Row As Integer, Column As Integer, Cell As String)
  641.   'Change the TextColor of the first row when printing Table Example
  642.   If MyPage <> 2 Then Exit Sub
  643.   If Row = 1 Then
  644.     vsPrinter1.TextColor = QBColor(Column)
  645.   Else
  646.     vsPrinter1.TextColor = 1
  647.   End If
  648. End Sub
  649.